package com.example.rpcdemo.rpc;

import java.io.Serializable;

public class RpcResponse implements Serializable {
    private static final long serialVersionUID = 1L;
    
    private Object result;
    private String error;
    
    public RpcResponse() {}
    
    public RpcResponse(Object result) {
        this.result = result;
    }
    
    public RpcResponse(String error) {
        this.error = error;
    }
    
    // Getters and setters
    public Object getResult() { return result; }
    public void setResult(Object result) { this.result = result; }
    
    public String getError() { return error; }
    public void setError(String error) { this.error = error; }
    
    public boolean hasError() {
        return error != null && !error.isEmpty();
    }
}